#ifndef Bone_h__
#define Bone_h__

#include "../Forest/TreeNode.h"
class Effect;

class Bone: public TreeNode
{
public:
	Bone(const tstring& name, float length, int id);
	virtual ~Bone();

	void Draw();
	void Init(const MeshDesc& mDesc);
	const tstring& GetName() const;
	int GetId() const;
	void SetAnimation(const vector<D3DXVECTOR3>& rotations);
	void NextStep();

private:
	float m_Length;
	ID3D10Buffer *m_VertexBuffer, *m_IndexBuffer;
	ID3D10Effect* m_Effect;
	ID3D10EffectTechnique *m_Tech;
	ID3D10EffectMatrixVariable *m_WorldVar, *m_WVPVar;
	ID3D10EffectVectorVariable *m_PosLightVar;
	ID3D10InputLayout *m_Layout;

	vector<D3DXVECTOR3> m_Animatie;
	int m_AnimStep;

	Bone(const Bone &t);
	Bone& operator= (const Bone &t);
};
#endif // Bone_h__